int32 TdApi::sendOrderReq(const py::dict& reqpOrdReq) {
  OesOrdReqT pOrdReq{NULLOBJ_OES_ORD_REQ};
  getValue<int32>(reqpOrdReq, "clSeqNo", pOrdReq.clSeqNo);
  getValue<uint8>(reqpOrdReq, "mktId", pOrdReq.mktId);
  getValue<uint8>(reqpOrdReq, "ordType", pOrdReq.ordType);
  getValue<uint8>(reqpOrdReq, "bsType", pOrdReq.bsType);
  getArray<char>(reqpOrdReq, "invAcctId", pOrdReq.invAcctId, 16);
  getArray<char>(reqpOrdReq, "securityId", pOrdReq.securityId, 16);
  getValue<int32>(reqpOrdReq, "ordQty", pOrdReq.ordQty);
  getValue<int32>(reqpOrdReq, "ordPrice", pOrdReq.ordPrice);
  getValue<int64>(reqpOrdReq, "origClOrdId", pOrdReq.origClOrdId);
  if (reqpOrdReq.contains("userInfo")) {
  auto reqpOrdReq_userInfo = reqpOrdReq["userInfo"].cast<py::dict>();
  getValue<uint64>(reqpOrdReq_userInfo, "u64", pOrdReq.userInfo.u64);
  getValue<int64>(reqpOrdReq_userInfo, "i64", pOrdReq.userInfo.i64);
  getArray<uint32>(reqpOrdReq_userInfo, "u32", pOrdReq.userInfo.u32, 2);
  getArray<int32>(reqpOrdReq_userInfo, "i32", pOrdReq.userInfo.i32, 2);
  getArray<char>(reqpOrdReq_userInfo, "c8", pOrdReq.userInfo.c8, 8);
  }
  
  int32 ret = OesAsyncApi_SendOrderReq(p_ord_channel, &pOrdReq);
  return ret;
}

int32 TdApi::sendOrderCancelReq(const py::dict& reqpCancelReq) {
  OesOrdCancelReqT pCancelReq{NULLOBJ_OES_ORD_CANCEL_REQ};
  getValue<int32>(reqpCancelReq, "clSeqNo", pCancelReq.clSeqNo);
  getValue<uint8>(reqpCancelReq, "mktId", pCancelReq.mktId);
  getArray<char>(reqpCancelReq, "invAcctId", pCancelReq.invAcctId, 16);
  getArray<char>(reqpCancelReq, "securityId", pCancelReq.securityId, 16);
  getValue<int32>(reqpCancelReq, "origClSeqNo", pCancelReq.origClSeqNo);
  getValue<int8>(reqpCancelReq, "origClEnvId", pCancelReq.origClEnvId);
  getValue<int64>(reqpCancelReq, "origClOrdId", pCancelReq.origClOrdId);
  if (reqpCancelReq.contains("userInfo")) {
  auto reqpCancelReq_userInfo = reqpCancelReq["userInfo"].cast<py::dict>();
  getValue<uint64>(reqpCancelReq_userInfo, "u64", pCancelReq.userInfo.u64);
  getValue<int64>(reqpCancelReq_userInfo, "i64", pCancelReq.userInfo.i64);
  getArray<uint32>(reqpCancelReq_userInfo, "u32", pCancelReq.userInfo.u32, 2);
  getArray<int32>(reqpCancelReq_userInfo, "i32", pCancelReq.userInfo.i32, 2);
  getArray<char>(reqpCancelReq_userInfo, "c8", pCancelReq.userInfo.c8, 8);
  }
  
  int32 ret = OesAsyncApi_SendOrderCancelReq(p_ord_channel, &pCancelReq);
  return ret;
}

int32 TdApi::sendFundTransferReq(const py::dict& reqpFundTrsfReq) {
  OesFundTrsfReqT pFundTrsfReq{NULLOBJ_OES_FUND_TRSF_REQ};
  getValue<int32>(reqpFundTrsfReq, "clSeqNo", pFundTrsfReq.clSeqNo);
  getValue<uint8>(reqpFundTrsfReq, "direct", pFundTrsfReq.direct);
  getValue<uint8>(reqpFundTrsfReq, "isAllotOnly", pFundTrsfReq.isAllotOnly);
  getArray<char>(reqpFundTrsfReq, "cashAcctId", pFundTrsfReq.cashAcctId, 16);
  getArray<char>(reqpFundTrsfReq, "trdPasswd", pFundTrsfReq.trdPasswd, 40);
  getArray<char>(reqpFundTrsfReq, "trsfPasswd", pFundTrsfReq.trsfPasswd, 40);
  getValue<int64>(reqpFundTrsfReq, "occurAmt", pFundTrsfReq.occurAmt);
  if (reqpFundTrsfReq.contains("userInfo")) {
  auto reqpFundTrsfReq_userInfo = reqpFundTrsfReq["userInfo"].cast<py::dict>();
  getValue<uint64>(reqpFundTrsfReq_userInfo, "u64", pFundTrsfReq.userInfo.u64);
  getValue<int64>(reqpFundTrsfReq_userInfo, "i64", pFundTrsfReq.userInfo.i64);
  getArray<uint32>(reqpFundTrsfReq_userInfo, "u32", pFundTrsfReq.userInfo.u32, 2);
  getArray<int32>(reqpFundTrsfReq_userInfo, "i32", pFundTrsfReq.userInfo.i32, 2);
  getArray<char>(reqpFundTrsfReq_userInfo, "c8", pFundTrsfReq.userInfo.c8, 8);
  }
  
  int32 ret = OesAsyncApi_SendFundTransferReq(p_ord_channel, &pFundTrsfReq);
  return ret;
}

py::tuple TdApi::sendChangePasswordReq(const py::dict& reqpChangePasswordReq) {
  OesChangePasswordReqT pChangePasswordReq{NULLOBJ_OES_CHANGE_PASSWORD_REQ};
  getValue<int32>(reqpChangePasswordReq, "encryptMethod", pChangePasswordReq.encryptMethod);
  getArray<char>(reqpChangePasswordReq, "username", pChangePasswordReq.username, 32);
  if (reqpChangePasswordReq.contains("userInfo")) {
  auto reqpChangePasswordReq_userInfo = reqpChangePasswordReq["userInfo"].cast<py::dict>();
  getValue<uint64>(reqpChangePasswordReq_userInfo, "u64", pChangePasswordReq.userInfo.u64);
  getValue<int64>(reqpChangePasswordReq_userInfo, "i64", pChangePasswordReq.userInfo.i64);
  getArray<uint32>(reqpChangePasswordReq_userInfo, "u32", pChangePasswordReq.userInfo.u32, 2);
  getArray<int32>(reqpChangePasswordReq_userInfo, "i32", pChangePasswordReq.userInfo.i32, 2);
  getArray<char>(reqpChangePasswordReq_userInfo, "c8", pChangePasswordReq.userInfo.c8, 8);
  }
  getArray<char>(reqpChangePasswordReq, "oldPassword", pChangePasswordReq.oldPassword, 40);
  getArray<char>(reqpChangePasswordReq, "newPassword", pChangePasswordReq.newPassword, 40);
  
  OesChangePasswordRspT pOutChangePasswordRsp;
  int32 ret = OesAsyncApi_SendChangePasswordReq(p_ord_channel, &pChangePasswordReq, &pOutChangePasswordRsp);
  py::dict dict_pOutChangePasswordRsp;
  dict_pOutChangePasswordRsp["encryptMethod"] = pOutChangePasswordRsp.encryptMethod;
  dict_pOutChangePasswordRsp["username"] = std::string(pOutChangePasswordRsp.username);
  py::dict dict_pOutChangePasswordRsp_userInfo;
  dict_pOutChangePasswordRsp_userInfo["u64"] = pOutChangePasswordRsp.userInfo.u64;
  dict_pOutChangePasswordRsp_userInfo["i64"] = pOutChangePasswordRsp.userInfo.i64;
  auto dict_pOutChangePasswordRsp_userInfo_u32 = py::list();
  for(const auto &x:pOutChangePasswordRsp.userInfo.u32)dict_pOutChangePasswordRsp_userInfo_u32.append(x);
  dict_pOutChangePasswordRsp_userInfo["u32"] = dict_pOutChangePasswordRsp_userInfo_u32;
  auto dict_pOutChangePasswordRsp_userInfo_i32 = py::list();
  for(const auto &x:pOutChangePasswordRsp.userInfo.i32)dict_pOutChangePasswordRsp_userInfo_i32.append(x);
  dict_pOutChangePasswordRsp_userInfo["i32"] = dict_pOutChangePasswordRsp_userInfo_i32;
  dict_pOutChangePasswordRsp_userInfo["c8"] = std::string(pOutChangePasswordRsp.userInfo.c8);
  dict_pOutChangePasswordRsp["userInfo"] = dict_pOutChangePasswordRsp_userInfo;
  dict_pOutChangePasswordRsp["clientId"] = pOutChangePasswordRsp.clientId;
  dict_pOutChangePasswordRsp["clEnvId"] = pOutChangePasswordRsp.clEnvId;
  dict_pOutChangePasswordRsp["transDate"] = pOutChangePasswordRsp.transDate;
  dict_pOutChangePasswordRsp["transTime"] = pOutChangePasswordRsp.transTime;
  dict_pOutChangePasswordRsp["rejReason"] = pOutChangePasswordRsp.rejReason;
  return py::make_tuple(ret, dict_pOutChangePasswordRsp);
}

py::tuple TdApi::sendOptSettlementConfirmReq(const py::dict& reqpOptSettlementConfirmReq) {
  OesOptSettlementConfirmReqT pOptSettlementConfirmReq{NULLOBJ_OES_OPT_SETTLEMENT_CONFIRM_REQ};
  getArray<char>(reqpOptSettlementConfirmReq, "custId", pOptSettlementConfirmReq.custId, 16);
  if (reqpOptSettlementConfirmReq.contains("userInfo")) {
  auto reqpOptSettlementConfirmReq_userInfo = reqpOptSettlementConfirmReq["userInfo"].cast<py::dict>();
  getValue<uint64>(reqpOptSettlementConfirmReq_userInfo, "u64", pOptSettlementConfirmReq.userInfo.u64);
  getValue<int64>(reqpOptSettlementConfirmReq_userInfo, "i64", pOptSettlementConfirmReq.userInfo.i64);
  getArray<uint32>(reqpOptSettlementConfirmReq_userInfo, "u32", pOptSettlementConfirmReq.userInfo.u32, 2);
  getArray<int32>(reqpOptSettlementConfirmReq_userInfo, "i32", pOptSettlementConfirmReq.userInfo.i32, 2);
  getArray<char>(reqpOptSettlementConfirmReq_userInfo, "c8", pOptSettlementConfirmReq.userInfo.c8, 8);
  }
  
  OesOptSettlementConfirmRspT pOptSettlementConfirmRsp;
  int32 ret = OesAsyncApi_SendOptSettlementConfirmReq(p_ord_channel, &pOptSettlementConfirmReq, &pOptSettlementConfirmRsp);
  py::dict dict_pOptSettlementConfirmRsp;
  dict_pOptSettlementConfirmRsp["custId"] = std::string(pOptSettlementConfirmRsp.custId);
  py::dict dict_pOptSettlementConfirmRsp_userInfo;
  dict_pOptSettlementConfirmRsp_userInfo["u64"] = pOptSettlementConfirmRsp.userInfo.u64;
  dict_pOptSettlementConfirmRsp_userInfo["i64"] = pOptSettlementConfirmRsp.userInfo.i64;
  auto dict_pOptSettlementConfirmRsp_userInfo_u32 = py::list();
  for(const auto &x:pOptSettlementConfirmRsp.userInfo.u32)dict_pOptSettlementConfirmRsp_userInfo_u32.append(x);
  dict_pOptSettlementConfirmRsp_userInfo["u32"] = dict_pOptSettlementConfirmRsp_userInfo_u32;
  auto dict_pOptSettlementConfirmRsp_userInfo_i32 = py::list();
  for(const auto &x:pOptSettlementConfirmRsp.userInfo.i32)dict_pOptSettlementConfirmRsp_userInfo_i32.append(x);
  dict_pOptSettlementConfirmRsp_userInfo["i32"] = dict_pOptSettlementConfirmRsp_userInfo_i32;
  dict_pOptSettlementConfirmRsp_userInfo["c8"] = std::string(pOptSettlementConfirmRsp.userInfo.c8);
  dict_pOptSettlementConfirmRsp["userInfo"] = dict_pOptSettlementConfirmRsp_userInfo;
  dict_pOptSettlementConfirmRsp["clientId"] = pOptSettlementConfirmRsp.clientId;
  dict_pOptSettlementConfirmRsp["clEnvId"] = pOptSettlementConfirmRsp.clEnvId;
  dict_pOptSettlementConfirmRsp["transDate"] = pOptSettlementConfirmRsp.transDate;
  dict_pOptSettlementConfirmRsp["transTime"] = pOptSettlementConfirmRsp.transTime;
  dict_pOptSettlementConfirmRsp["rejReason"] = pOptSettlementConfirmRsp.rejReason;
  return py::make_tuple(ret, dict_pOptSettlementConfirmRsp);
}

BOOL TdApi::sendHeartbeat() {
  BOOL ret = OesAsyncApi_SendHeartbeat(p_ord_channel);
  return ret;
}

BOOL TdApi::sendTestReq(const std::string& pTestReqId, int32 testReqIdSize) {
  BOOL ret = OesAsyncApi_SendTestReq(p_ord_channel, pTestReqId.c_str(), testReqIdSize);
  return ret;
}

py::tuple TdApi::querySingleOrder(int32 clSeqNo) {
  OesOrdItemT pOutOrdItem;
  int32 ret = OesApi_QuerySingleOrder(p_qry_channel, clSeqNo, &pOutOrdItem);
  py::dict dict_pOutOrdItem;
  dict_pOutOrdItem["clSeqNo"] = pOutOrdItem.clSeqNo;
  dict_pOutOrdItem["mktId"] = pOutOrdItem.mktId;
  dict_pOutOrdItem["ordType"] = pOutOrdItem.ordType;
  dict_pOutOrdItem["bsType"] = pOutOrdItem.bsType;
  dict_pOutOrdItem["invAcctId"] = std::string(pOutOrdItem.invAcctId);
  dict_pOutOrdItem["securityId"] = std::string(pOutOrdItem.securityId);
  dict_pOutOrdItem["ordQty"] = pOutOrdItem.ordQty;
  dict_pOutOrdItem["ordPrice"] = pOutOrdItem.ordPrice;
  dict_pOutOrdItem["origClOrdId"] = pOutOrdItem.origClOrdId;
  py::dict dict_pOutOrdItem_userInfo;
  dict_pOutOrdItem_userInfo["u64"] = pOutOrdItem.userInfo.u64;
  dict_pOutOrdItem_userInfo["i64"] = pOutOrdItem.userInfo.i64;
  auto dict_pOutOrdItem_userInfo_u32 = py::list();
  for(const auto &x:pOutOrdItem.userInfo.u32)dict_pOutOrdItem_userInfo_u32.append(x);
  dict_pOutOrdItem_userInfo["u32"] = dict_pOutOrdItem_userInfo_u32;
  auto dict_pOutOrdItem_userInfo_i32 = py::list();
  for(const auto &x:pOutOrdItem.userInfo.i32)dict_pOutOrdItem_userInfo_i32.append(x);
  dict_pOutOrdItem_userInfo["i32"] = dict_pOutOrdItem_userInfo_i32;
  dict_pOutOrdItem_userInfo["c8"] = std::string(pOutOrdItem.userInfo.c8);
  dict_pOutOrdItem["userInfo"] = dict_pOutOrdItem_userInfo;
  dict_pOutOrdItem["clOrdId"] = pOutOrdItem.clOrdId;
  dict_pOutOrdItem["clientId"] = pOutOrdItem.clientId;
  dict_pOutOrdItem["clEnvId"] = pOutOrdItem.clEnvId;
  dict_pOutOrdItem["origClEnvId"] = pOutOrdItem.origClEnvId;
  dict_pOutOrdItem["origClSeqNo"] = pOutOrdItem.origClSeqNo;
  dict_pOutOrdItem["ordDate"] = pOutOrdItem.ordDate;
  dict_pOutOrdItem["ordTime"] = pOutOrdItem.ordTime;
  dict_pOutOrdItem["ordCnfmTime"] = pOutOrdItem.ordCnfmTime;
  dict_pOutOrdItem["ordStatus"] = pOutOrdItem.ordStatus;
  dict_pOutOrdItem["ordCnfmSts"] = pOutOrdItem.ordCnfmSts;
  dict_pOutOrdItem["securityType"] = pOutOrdItem.securityType;
  dict_pOutOrdItem["subSecurityType"] = pOutOrdItem.subSecurityType;
  dict_pOutOrdItem["productType"] = pOutOrdItem.productType;
  dict_pOutOrdItem["exchOrdId"] = std::string(pOutOrdItem.exchOrdId);
  dict_pOutOrdItem["ownerType"] = pOutOrdItem.ownerType;
  dict_pOutOrdItem["frzAmt"] = pOutOrdItem.frzAmt;
  dict_pOutOrdItem["frzInterest"] = pOutOrdItem.frzInterest;
  dict_pOutOrdItem["frzFee"] = pOutOrdItem.frzFee;
  dict_pOutOrdItem["cumAmt"] = pOutOrdItem.cumAmt;
  dict_pOutOrdItem["cumInterest"] = pOutOrdItem.cumInterest;
  dict_pOutOrdItem["cumFee"] = pOutOrdItem.cumFee;
  dict_pOutOrdItem["cumQty"] = pOutOrdItem.cumQty;
  dict_pOutOrdItem["canceledQty"] = pOutOrdItem.canceledQty;
  dict_pOutOrdItem["ordRejReason"] = pOutOrdItem.ordRejReason;
  dict_pOutOrdItem["exchErrCode"] = pOutOrdItem.exchErrCode;
  dict_pOutOrdItem["pbuId"] = pOutOrdItem.pbuId;
  dict_pOutOrdItem["branchId"] = pOutOrdItem.branchId;
  dict_pOutOrdItem["frzMargin"] = pOutOrdItem.frzMargin;
  dict_pOutOrdItem["cumMargin"] = pOutOrdItem.cumMargin;
  return py::make_tuple(ret, dict_pOutOrdItem);
}

py::tuple TdApi::querySingleCashAsset(const std::string& pCashAcctId) {
  OesCashAssetItemT pOutCashAssetItem;
  int32 ret = OesApi_QuerySingleCashAsset(p_qry_channel, pCashAcctId.c_str(), &pOutCashAssetItem);
  py::dict dict_pOutCashAssetItem;
  dict_pOutCashAssetItem["cashAcctId"] = std::string(pOutCashAssetItem.cashAcctId);
  dict_pOutCashAssetItem["custId"] = std::string(pOutCashAssetItem.custId);
  dict_pOutCashAssetItem["currType"] = pOutCashAssetItem.currType;
  dict_pOutCashAssetItem["cashType"] = pOutCashAssetItem.cashType;
  dict_pOutCashAssetItem["cashAcctStatus"] = pOutCashAssetItem.cashAcctStatus;
  dict_pOutCashAssetItem["isFundTrsfDisabled"] = pOutCashAssetItem.isFundTrsfDisabled;
  dict_pOutCashAssetItem["beginningBal"] = pOutCashAssetItem.beginningBal;
  dict_pOutCashAssetItem["beginningAvailableBal"] = pOutCashAssetItem.beginningAvailableBal;
  dict_pOutCashAssetItem["beginningDrawableBal"] = pOutCashAssetItem.beginningDrawableBal;
  dict_pOutCashAssetItem["disableBal"] = pOutCashAssetItem.disableBal;
  dict_pOutCashAssetItem["reversalAmt"] = pOutCashAssetItem.reversalAmt;
  dict_pOutCashAssetItem["manualFrzAmt"] = pOutCashAssetItem.manualFrzAmt;
  dict_pOutCashAssetItem["totalDepositAmt"] = pOutCashAssetItem.totalDepositAmt;
  dict_pOutCashAssetItem["totalWithdrawAmt"] = pOutCashAssetItem.totalWithdrawAmt;
  dict_pOutCashAssetItem["withdrawFrzAmt"] = pOutCashAssetItem.withdrawFrzAmt;
  dict_pOutCashAssetItem["totalSellAmt"] = pOutCashAssetItem.totalSellAmt;
  dict_pOutCashAssetItem["totalBuyAmt"] = pOutCashAssetItem.totalBuyAmt;
  dict_pOutCashAssetItem["buyFrzAmt"] = pOutCashAssetItem.buyFrzAmt;
  dict_pOutCashAssetItem["totalFeeAmt"] = pOutCashAssetItem.totalFeeAmt;
  dict_pOutCashAssetItem["feeFrzAmt"] = pOutCashAssetItem.feeFrzAmt;
  dict_pOutCashAssetItem["marginAmt"] = pOutCashAssetItem.marginAmt;
  dict_pOutCashAssetItem["marginFrzAmt"] = pOutCashAssetItem.marginFrzAmt;
  dict_pOutCashAssetItem["currentTotalBal"] = pOutCashAssetItem.currentTotalBal;
  dict_pOutCashAssetItem["currentAvailableBal"] = pOutCashAssetItem.currentAvailableBal;
  dict_pOutCashAssetItem["currentDrawableBal"] = pOutCashAssetItem.currentDrawableBal;
  py::dict dict_pOutCashAssetItem_optionExt;
  dict_pOutCashAssetItem_optionExt["initialMargin"] = pOutCashAssetItem.optionExt.initialMargin;
  dict_pOutCashAssetItem_optionExt["totalExerciseFrzAmt"] = pOutCashAssetItem.optionExt.totalExerciseFrzAmt;
  dict_pOutCashAssetItem_optionExt["pendingSupplMargin"] = pOutCashAssetItem.optionExt.pendingSupplMargin;
  dict_pOutCashAssetItem_optionExt["sseAvailablePurchaseLimit"] = pOutCashAssetItem.optionExt.sseAvailablePurchaseLimit;
  dict_pOutCashAssetItem_optionExt["szseAvailablePurchaseLimit"] = pOutCashAssetItem.optionExt.szseAvailablePurchaseLimit;
  dict_pOutCashAssetItem_optionExt["totalMarketMargin"] = pOutCashAssetItem.optionExt.totalMarketMargin;
  dict_pOutCashAssetItem_optionExt["totalNetMargin"] = pOutCashAssetItem.optionExt.totalNetMargin;
  dict_pOutCashAssetItem["optionExt"] = dict_pOutCashAssetItem_optionExt;
  return py::make_tuple(ret, dict_pOutCashAssetItem);
}

py::tuple TdApi::querySingleStkHolding(const std::string& pInvAcctId, const std::string& pSecurityId) {
  OesStkHoldingItemT pOutHoldingItem;
  int32 ret = OesApi_QuerySingleStkHolding(p_qry_channel, pInvAcctId.c_str(), pSecurityId.c_str(), &pOutHoldingItem);
  py::dict dict_pOutHoldingItem;
  dict_pOutHoldingItem["invAcctId"] = std::string(pOutHoldingItem.invAcctId);
  dict_pOutHoldingItem["securityId"] = std::string(pOutHoldingItem.securityId);
  dict_pOutHoldingItem["mktId"] = pOutHoldingItem.mktId;
  dict_pOutHoldingItem["securityType"] = pOutHoldingItem.securityType;
  dict_pOutHoldingItem["subSecurityType"] = pOutHoldingItem.subSecurityType;
  dict_pOutHoldingItem["productType"] = pOutHoldingItem.productType;
  dict_pOutHoldingItem["originalHld"] = pOutHoldingItem.originalHld;
  dict_pOutHoldingItem["originalCostAmt"] = pOutHoldingItem.originalCostAmt;
  dict_pOutHoldingItem["totalBuyHld"] = pOutHoldingItem.totalBuyHld;
  dict_pOutHoldingItem["totalSellHld"] = pOutHoldingItem.totalSellHld;
  dict_pOutHoldingItem["sellFrzHld"] = pOutHoldingItem.sellFrzHld;
  dict_pOutHoldingItem["manualFrzHld"] = pOutHoldingItem.manualFrzHld;
  dict_pOutHoldingItem["totalBuyAmt"] = pOutHoldingItem.totalBuyAmt;
  dict_pOutHoldingItem["totalSellAmt"] = pOutHoldingItem.totalSellAmt;
  dict_pOutHoldingItem["totalBuyFee"] = pOutHoldingItem.totalBuyFee;
  dict_pOutHoldingItem["totalSellFee"] = pOutHoldingItem.totalSellFee;
  dict_pOutHoldingItem["totalTrsfInHld"] = pOutHoldingItem.totalTrsfInHld;
  dict_pOutHoldingItem["totalTrsfOutHld"] = pOutHoldingItem.totalTrsfOutHld;
  dict_pOutHoldingItem["trsfOutFrzHld"] = pOutHoldingItem.trsfOutFrzHld;
  dict_pOutHoldingItem["originalLockHld"] = pOutHoldingItem.originalLockHld;
  dict_pOutHoldingItem["totalLockHld"] = pOutHoldingItem.totalLockHld;
  dict_pOutHoldingItem["totalUnlockHld"] = pOutHoldingItem.totalUnlockHld;
  dict_pOutHoldingItem["originalAvlHld"] = pOutHoldingItem.originalAvlHld;
  dict_pOutHoldingItem["maxReduceQuota"] = pOutHoldingItem.maxReduceQuota;
  dict_pOutHoldingItem["sellAvlHld"] = pOutHoldingItem.sellAvlHld;
  dict_pOutHoldingItem["trsfOutAvlHld"] = pOutHoldingItem.trsfOutAvlHld;
  dict_pOutHoldingItem["lockAvlHld"] = pOutHoldingItem.lockAvlHld;
  dict_pOutHoldingItem["sumHld"] = pOutHoldingItem.sumHld;
  dict_pOutHoldingItem["costPrice"] = pOutHoldingItem.costPrice;
  return py::make_tuple(ret, dict_pOutHoldingItem);
}

py::tuple TdApi::queryBrokerParamsInfo() {
  OesBrokerParamsInfoT pOutBrokerParams;
  int32 ret = OesApi_QueryBrokerParamsInfo(p_qry_channel, &pOutBrokerParams);
  py::dict dict_pOutBrokerParams;
  dict_pOutBrokerParams["brokerName"] = std::string(pOutBrokerParams.brokerName);
  dict_pOutBrokerParams["brokerPhone"] = std::string(pOutBrokerParams.brokerPhone);
  dict_pOutBrokerParams["brokerWebsite"] = std::string(pOutBrokerParams.brokerWebsite);
  dict_pOutBrokerParams["apiVersion"] = std::string(pOutBrokerParams.apiVersion);
  dict_pOutBrokerParams["apiMinVersion"] = std::string(pOutBrokerParams.apiMinVersion);
  dict_pOutBrokerParams["clientVersion"] = std::string(pOutBrokerParams.clientVersion);
  dict_pOutBrokerParams["changePwdLimitTime"] = pOutBrokerParams.changePwdLimitTime;
  dict_pOutBrokerParams["minClientPasswordLen"] = pOutBrokerParams.minClientPasswordLen;
  dict_pOutBrokerParams["clientPasswordStrength"] = pOutBrokerParams.clientPasswordStrength;
  dict_pOutBrokerParams["businessScope"] = pOutBrokerParams.businessScope;
  py::dict dict_pOutBrokerParams_optionExt;
  dict_pOutBrokerParams_optionExt["withdrawLineRatio"] = pOutBrokerParams.optionExt.withdrawLineRatio;
  dict_pOutBrokerParams["optionExt"] = dict_pOutBrokerParams_optionExt;
  return py::make_tuple(ret, dict_pOutBrokerParams);
}

